package com.foreknow.elmboot.service;

import com.foreknow.elmboot.po.DeliveryAddress;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/7
 */
public interface DeliveryAddressService {
    /**
     * 根据用户编号查询所属送货地址
     * @param userId
     * @return
     */
    public List<DeliveryAddress> listDeliveryAddressByUserId(String userId);

    /**
     * 根据送货地址编号查询送货地址
     * @param daId
     * @return
     */
    public DeliveryAddress getDeliveryAddressById(Integer daId);

    /**
     * 送货地址表中添加一条记录
     * @param deliveryAddress
     * @return
     */
    public Integer saveDeliveryAddress(DeliveryAddress deliveryAddress);

    /**
     * 根据送货地址编号更新送货地址信息
     * @param deliveryAddress
     * @return
     */
    public Integer updateDeliveryAddress(DeliveryAddress deliveryAddress);

    /**
     * 根据送货地址编号删除一条记录
     * @param daId
     * @return
     */
    public Integer removeDeliveryAddress(Integer daId);
}
